<?php
/**
 * Created by PhpStorm.
 * User: 式神 (luck48.com)
 * Email: 289650682@qq.com
 * Name: ${NAME}Administrator
 * Date: 2017-04-06
 * Time: 14:25
 */
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="initial-scale=1,minimum-scale=1" />
    <title></title>
    <meta name="description" content="">
    <meta name="keywords" content="">
    <link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">
    <link rel="stylesheet" href="{{asset('public/statics/default/css/public.css')}}" >
    @section('css')
    @show
</head>
<body>
<div class="logo-top"><img src="{{asset('public/statics/default/img/logo.jpg')}}"/></div>
<header>
    <div class="container nav-head">
        <nav class="navbar navbar-default" role="navigation">
            <div class="container-fluid">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse"
                            data-target="#example-navbar-collapse">
                        <span class="sr-only"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                </div>
                <div class="collapse navbar-collapse" id="example-navbar-collapse">
                    <ul class="nav navbar-nav">
                        <li class="active"><a href="{{url('')}}">Home</a></li>
                        @menu(0 as $v)
                            @if(count($v['sub'])>0)
                            <li class="dropdown">
                                <a href="{{$v['url']}}" class="dropdown-toggle" data-hover="dropdown">
                                    {{$v['name']}} <b class="caret"></b>
                                </a>
                                <ul class="dropdown-menu">
                                    @foreach($v['sub'] as $r)
                                        <li><a href="{{$r['url']}}">{{$r['name']}}</a></li>
                                    @endforeach
                                </ul>
                            </li>
                            @else
                            <li class="active"><a href="{{$v['url']}}">{{$v['name']}}</a></li>
                            @endif
                        @endmenu
                    </ul>
                </div>
            </div>
        </nav>
    </div>
</header>
@section('main')

@show
<footer>
    <div class="foot-bottom">
        <div class="logo-foot"><img src="{{asset('public/statics/default/img/logo-bottom.jpg')}}"></div>
        <div class="share">
            <ul>
                <li class="col-sm-3"></li>
                <li class="col-sm-3"></li>
                <li class="col-sm-3"></li>
                <li class="col-sm-3"></li>
            </ul>
        </div>
    </div>
</footer>
</body>
<script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="{{asset('public/statics/default/js/layui/layui.js')}}"></script>
<script>
    (function($, window, undefined) {
        var $allDropdowns = $();
        $.fn.dropdownHover = function(options) {
            $allDropdowns = $allDropdowns.add(this.parent());

            return this.each(function() {
                var $this = $(this).parent(),
                        defaults = {
                            delay: 100,
                            instantlyCloseOthers: true
                        },
                        data = {
                            delay: $(this).data('delay'),
                            instantlyCloseOthers: $(this).data('close-others')
                        },
                        options = $.extend(true, {}, defaults, options, data),
                        timeout;

                $this.hover(function() {
                    if(options.instantlyCloseOthers === true)
                        $allDropdowns.removeClass('open');

                    window.clearTimeout(timeout);
                    $(this).addClass('open');
                }, function() {
                    timeout = window.setTimeout(function() {
                        $this.removeClass('open');
                    }, options.delay);
                });
            });
        };
        $('[data-hover="dropdown"]').dropdownHover();
    })(jQuery, this);
</script>
@section('js')
@show
</html>
